package com.example.b_308.myapplication.view;

import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.os.PersistableBundle;
import android.support.annotation.Nullable;
import android.view.View;

import com.example.b_308.myapplication.R;
import com.example.b_308.myapplication.comment.view.TitleBar;
import com.example.b_308.myapplication.view.base.BaseActivity;


/**
 * Created by B-308 on 2017/11/15.
 */
public class SplashActivity extends BaseActivity {
    Handler handler;
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        handler=new Handler(getMainLooper()){
            @Override
            public void handleMessage(Message msg) {
                super.handleMessage(msg);

                tent2(LoginbgActivity.class);
            }
        };
        setContentView(R.layout.activity_splash);
        getTitleBar().setVisibility(View.GONE);
        Thread thread=new Thread(new Runnable() {
            @Override
            public void run() {
                try {
                    Thread.sleep(2000);
                    handler.sendEmptyMessage(1);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }
        });
        thread.run();
    }




    @Override
    public TitleBar getTitleBar() {
        return null;
    }
}
